clear, close, clc

x = 0:.001:1;
for k=1:100
    f = sin(pi*x);
    g = cos(k*pi*x);
    ksum(k) = sum(f.*g);
end
plot(ksum)

% m不等于n时，正交